Side navigation
Ticket #3495: sync-fx[5892].diff
File sync-fx[5892].diff, 1.2 KB (added by flesler, October 18, 2008 11:26PM UTC)
Index: fx.js
===================================================================
--- fx.js (revision 5892)
+++ fx.js (working copy)
@@ -208,9 +208,8 @@
easing: fn && easing || easing && easing.constructor != Function && easing
};
- opt.duration = (opt.duration && opt.duration.constructor == Number ?
- opt.duration :
- jQuery.fx.speeds[opt.duration]) || jQuery.fx.speeds._default;
+ opt.duration = typeof opt.duration == 'number' ? opt.duration :
+ jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
// Queueing
opt.old = opt.complete;
@@ -278,7 +277,6 @@
this.unit = unit || this.unit || "px";
this.now = this.start;
this.pos = this.state = 0;
- this.update();
var self = this;
function t(gotoEnd){
@@ -289,7 +287,7 @@
jQuery.timers.push(t);
- if ( jQuery.timerId == null ) {
+ if ( t() && jQuery.timerId == null ) {
jQuery.timerId = setInterval(function(){
var timers = jQuery.timers;
@@ -337,7 +335,7 @@
step: function(gotoEnd){
var t = now();
- if ( gotoEnd || t > this.options.duration + this.startTime ) {
+ if ( gotoEnd || t >= this.options.duration + this.startTime ) {
this.now = this.end;
this.pos = this.state = 1;
this.update();
Download in other formats:
Original Format
File sync-fx[5892].diff, 1.2 KB (added by flesler, October 18, 2008 11:26PM UTC)
Index: fx.js
===================================================================
--- fx.js (revision 5892)
+++ fx.js (working copy)
@@ -208,9 +208,8 @@
easing: fn && easing || easing && easing.constructor != Function && easing
};
- opt.duration = (opt.duration && opt.duration.constructor == Number ?
- opt.duration :
- jQuery.fx.speeds[opt.duration]) || jQuery.fx.speeds._default;
+ opt.duration = typeof opt.duration == 'number' ? opt.duration :
+ jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
// Queueing
opt.old = opt.complete;
@@ -278,7 +277,6 @@
this.unit = unit || this.unit || "px";
this.now = this.start;
this.pos = this.state = 0;
- this.update();
var self = this;
function t(gotoEnd){
@@ -289,7 +287,7 @@
jQuery.timers.push(t);
- if ( jQuery.timerId == null ) {
+ if ( t() && jQuery.timerId == null ) {
jQuery.timerId = setInterval(function(){
var timers = jQuery.timers;
@@ -337,7 +335,7 @@
step: function(gotoEnd){
var t = now();
- if ( gotoEnd || t > this.options.duration + this.startTime ) {
+ if ( gotoEnd || t >= this.options.duration + this.startTime ) {
this.now = this.end;
this.pos = this.state = 1;
this.update();